package com.zhangjie.apipassenger.remote;

import com.zhangjie.internalcommon.dto.PassengerUser;
import com.zhangjie.internalcommon.dto.ResponseResult;
import com.zhangjie.internalcommon.request.VerificationCodeDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @Auther: zj
 * @Date: 2024/1/25 - 01 - 25 - 18:41
 * @Description: com.zhangjie.apipassenger.remote
 * @version: 1.0
 */
@FeignClient("service-passenger-user")
public interface ServicePassengerUserClient {

    @RequestMapping(method = RequestMethod.POST, value = "/user")
    ResponseResult loginOrRegister(@RequestBody VerificationCodeDTO verificationCodeDTO);

    @RequestMapping(method = RequestMethod.GET, value = "/user/{phone}")
    ResponseResult<PassengerUser> getUserByPhone(@PathVariable("phone") String phone);
}
